<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			#d1{
			  position: absolute;
              top: 0px;
              left: 0px;
			}
		</style>
		<script>
			//当鼠标在窗体移动时，执行匿名函数
			window.onmousemove=function(e){
				var x=e.pageX;
				var y=e.pageY;
				var obj=document.getElementById("d1");
				obj.style.top=y+"px";
				obj.style.left=x+"px";
			}
		</script>
	</head>
	<body>
		<div  id="d1">
			<img src="../img/timg.gif" />
		</div>
	</body>
</html>
